<?php
/**
 * Created by PhpStorm.
 * User: Yieong
 * Date: 14/12/23
 * Time: 下午7:10
 */

class PubDatabase {

    public static function getDbName($dbName, $platform, $game){
        return ucfirst(strtolower($game)).$dbName;
    }

    public static function getMgmtDbName($platform, $game){
        return self::getDbName('MgmtDB', $platform, $game);
    }

    public static function getRtDbName($platform, $game){
        return self::getDbName('RealTimeDB', $platform, $game);
    }
    
    public static function getDriveDbName($platform, $game){
    	return self::getDbName('DriveDB', $platform, $game);
    }

    public static function getDictDbName($game){
        return strtoupper($game)."_Dict";
    }

    public static function getLogDbName($platform, $game, $server){
        return "{$platform}_{$game}_{$server}";
    }

    public static function getAffiliateDbName($platform=false){
        if($platform == 'de')
            return 'de_platform';
        else if($platform == 'fr')
            return 'fr_platform';
        else
            return 'db_plat_v2';
    }

    public static function getAffiliateDbConf($platform=false){
        if($platform == 'de')
            return 'dbAffiliateDe';
        else if($platform == 'fr')
            return 'dbAffiliateFr';
        else
            return 'dbAffiliate';
    }
    
    public static function getR2MgmtDB(){
    	return 'R2gamesMgmtDB';
    }
} 